package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 渠道访问日志表
 * Created by hone on 17-2-4.
 */
@Entity
@Table(name = "channel_event")
@DynamicInsert
@DynamicUpdate
public class ChannelEvent extends IDEntityMall {

    @Column(columnDefinition = "bigint(20) comment '平台ID'")
    private Long mallId;
    @Column(columnDefinition = "bigint(20) comment '商家ID'")
    private Long merchantId;
    @Column(columnDefinition = "bigint(20) comment '渠道ID'")
    private Long channelId;
    @Column(columnDefinition = "bigint(20) comment '访客Id'")
    private Long visitCustomerId;
    @Column(columnDefinition = "varchar(100) comment '访客IP'")
    private String visitIp;

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Long getVisitCustomerId() {
        return visitCustomerId;
    }

    public void setVisitCustomerId(Long visitCustomerId) {
        this.visitCustomerId = visitCustomerId;
    }

    public String getVisitIp() {
        return visitIp;
    }

    public void setVisitIp(String visitIp) {
        this.visitIp = visitIp;
    }

    @Override
    public String toString() {
        return "ChannelEvent{" +
                "mallId=" + mallId +
                ", merchantId=" + merchantId +
                ", id=" + id +
                ", channelId=" + channelId +
                ", dateCreated=" + dateCreated +
                ", visitCustomerId=" + visitCustomerId +
                ", lastUpdated=" + lastUpdated +
                ", visitIp='" + visitIp + '\'' +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
